package oop11.printer;

import java.io.PrintWriter;

/**
 * @author oldliu
 * @since 1.0
 */
//打印机
public class Printer {
    //牌子
    private String brand;
    //不能认为打印机带了墨水和纸张。。。
    //应该是打印机提供了墨水和纸张的接口
    private Ink ink;
    private Paper paper;
    public Printer(String b){
        this.brand=b;
    }
    //打印功能
    public void doPrint(String s){
        System.out.println("用"+ink.getColor()+"墨水来打印");
        paper.print(s);
    }

    public void setInk(Ink ink) {
        this.ink = ink;
    }

    public void setPaper(Paper paper) {
        this.paper = paper;
    }
}
